#region Using
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
#endregion Using

namespace CY.GFive.Core.Business
{
	public class Note : Business.BusinessBase<Note, int>
	{
		#region Fields and Properties

		private int pulishModule = 0;
		/// <summary>
		/// 
		/// </summary>
		public int PulishModule
		{
			get { return pulishModule; }
			set
			{
				if (value != pulishModule)
				{
					MarkChanged("PulishModule");
					pulishModule = value;
				}
			}
		}

		private int pulisherKey = 0;
		/// <summary>
		/// 
		/// </summary>
		public int PulisherKey
		{
			get { return pulisherKey; }
			set
			{
				if (value != pulisherKey)
				{
					MarkChanged("PulisherKey");
					pulisherKey = value;
				}
			}
		}

		private int noteType = 0;
		/// <summary>
		/// 
		/// </summary>
		public int NoteType
		{
			get { return noteType; }
			set
			{
				if (value != noteType)
				{
					MarkChanged("NoteType");
					noteType = value;
				}
			}
		}

		private int noteTimes = 0;
		/// <summary>
		/// 
		/// </summary>
		public int NoteTimes
		{
			get { return noteTimes; }
			set
			{
				if (value != noteTimes)
				{
					MarkChanged("NoteTimes");
					noteTimes = value;
				}
			}
		}

		private DateTime noteDate = DateTime.MinValue;
		/// <summary>
		/// 
		/// </summary>
		public DateTime NoteDate
		{
			get { return noteDate; }
			set
			{
				if (value != noteDate)
				{
					MarkChanged("NoteDate");
					noteDate = value;
				}
			}
		}

		private String noteContent = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String NoteContent
		{
			get { return noteContent; }
			set
			{
				if (value != noteContent)
				{
					MarkChanged("NoteContent");
					noteContent = value;
				}
			}
		}

		private String noteTitle = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String NoteTitle
		{
			get { return noteTitle; }
			set
			{
				if (value != noteTitle)
				{
					MarkChanged("NoteTitle");
					noteTitle = value;
				}
			}
		}

		#endregion Fields and Properties

		#region Constructors

		public Note()
		{
		}

		#endregion Constructors

		#region Base overrides

		protected override void ValidationRules()
		{
		}

		protected override Note DataSelect(int id)
		{
			return Services.DALService.NoteService.Select(id);
		}

		protected override void DataUpdate()
		{
			Services.DALService.NoteService.Update(this);
		}

		protected override void DataInsert()
		{
			Services.DALService.NoteService.Insert(this);
		}

		protected override void DataDelete()
		{
			Services.DALService.NoteService.Delete(this);
		}

		#endregion Base overrides
	}
}
